package com.opesoft.fw.edm;

import com.opesoft.fw.mvc.ControllerServlet;

public class EDM_DWRInterface
{
	public Object event(String url,String data)
	{

		try
		{
			String logicClass=ControllerServlet.mappingClassPath(url,"");
			Logic logic=(Logic)Class.forName(logicClass).newInstance();
			logic.init(uk.ltd.getahead.dwr.WebContextFactory.get(),data);
			try
			{
				return logic.execute();
			}
			catch(Exception e)
			{
				return logic.error(e);
			}
		}
		catch(Exception e)
		{
			e.printStackTrace();
			return e.getMessage();
		}
	}
}
